'\" te
.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH DDI_GET_KT_DID 9F "May 15, 2001"
.SH NAME
ddi_get_kt_did \- get identifier of current thread
.SH SYNOPSIS
.nf
#include <sys/types.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>



\fBkt_did_t\fR \fBddi_get_kt_did\fR(\fB\fR\fIvoid\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI)
.SH DESCRIPTION
The \fBddi_get_kt_did()\fR function returns a unique 64-bit identifier for the
currently running thread.
.SH CONTEXT
This routine can be called from user, kernel, or interrupt context. This
routine cannot be called from a high-level interrupt context.
.SH RETURN VALUES
\fBddi_get_kt_did()\fR always returns the identifier for the current thread.
There are no error conditions.
.SH SEE ALSO
\fIWriting Device Drivers\fR
.SH NOTES
The value returned by this function can also be seen in \fBadb\fR or \fBmdb\fR
as the \fBdid\fR field displayed when using the \fBthread\fR macro.
.sp
.LP
This interface is intended for tracing and debugging purposes.
